\(\int (c+d x) (a+b \sinh (e+f x))^2 \, dx\) [165]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 116 \[ \int (c+d x) (a+b \sinh (e+f x))^2 \, dx=-\frac {1}{2} b^2 c x-\frac {1}{4} b^2 d x^2+\frac {a^2 (c+d x)^2}{2 d}+\frac {2 a b (c+d x) \cosh (e+f x)}{f}-\frac {2 a b d \sinh (e+f x)}{f^2}+\frac {b^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{2 f}-\frac {b^2 d \sinh ^2(e+f x)}{4 f^2} \]

[Out]

-1/2*b^2*c*x-1/4*b^2*d*x^2+1/2*a^2*(d*x+c)^2/d+2*a*b*(d*x+c)*cosh(f*x+e)/f-2*a*b*d*sinh(f*x+e)/f^2+1/2*b^2*(d*
x+c)*cosh(f*x+e)*sinh(f*x+e)/f-1/4*b^2*d*sinh(f*x+e)^2/f^2

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3398, 3377, 2717, 3391} \[ \int (c+d x) (a+b \sinh (e+f x))^2 \, dx=\frac {a^2 (c+d x)^2}{2 d}+\frac {2 a b (c+d x) \cosh (e+f x)}{f}-\frac {2 a b d \sinh (e+f x)}{f^2}+\frac {b^2 (c+d x) \sinh (e+f x) \cosh (e+f x)}{2 f}-\frac {1}{2} b^2 c x-\frac {b^2 d \sinh ^2(e+f x)}{4 f^2}-\frac {1}{4} b^2 d x^2 \]

[In]

Int[(c + d*x)*(a + b*Sinh[e + f*x])^2,x]

[Out]

-1/2*(b^2*c*x) - (b^2*d*x^2)/4 + (a^2*(c + d*x)^2)/(2*d) + (2*a*b*(c + d*x)*Cosh[e + f*x])/f - (2*a*b*d*Sinh[e
 + f*x])/f^2 + (b^2*(c + d*x)*Cosh[e + f*x]*Sinh[e + f*x])/(2*f) - (b^2*d*Sinh[e + f*x]^2)/(4*f^2)

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3391

Int[((c_.) + (d_.)*(x_))*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d*((b*Sin[e + f*x])^n/(f^2*n^
2)), x] + (Dist[b^2*((n - 1)/n), Int[(c + d*x)*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[b*(c + d*x)*Cos[e + f*x
]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1]

Rule 3398

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rubi steps \begin{align*} \text {integral}& = \int \left (a^2 (c+d x)+2 a b (c+d x) \sinh (e+f x)+b^2 (c+d x) \sinh ^2(e+f x)\right ) \, dx \\ & = \frac {a^2 (c+d x)^2}{2 d}+(2 a b) \int (c+d x) \sinh (e+f x) \, dx+b^2 \int (c+d x) \sinh ^2(e+f x) \, dx \\ & = \frac {a^2 (c+d x)^2}{2 d}+\frac {2 a b (c+d x) \cosh (e+f x)}{f}+\frac {b^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{2 f}-\frac {b^2 d \sinh ^2(e+f x)}{4 f^2}-\frac {1}{2} b^2 \int (c+d x) \, dx-\frac {(2 a b d) \int \cosh (e+f x) \, dx}{f} \\ & = -\frac {1}{2} b^2 c x-\frac {1}{4} b^2 d x^2+\frac {a^2 (c+d x)^2}{2 d}+\frac {2 a b (c+d x) \cosh (e+f x)}{f}-\frac {2 a b d \sinh (e+f x)}{f^2}+\frac {b^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{2 f}-\frac {b^2 d \sinh ^2(e+f x)}{4 f^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 4.40 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.84 \[ \int (c+d x) (a+b \sinh (e+f x))^2 \, dx=-\frac {2 \left (2 a^2-b^2\right ) (e+f x) (-2 c f+d (e-f x))-16 a b f (c+d x) \cosh (e+f x)+b^2 d \cosh (2 (e+f x))+16 a b d \sinh (e+f x)-2 b^2 f (c+d x) \sinh (2 (e+f x))}{8 f^2} \]

[In]

Integrate[(c + d*x)*(a + b*Sinh[e + f*x])^2,x]

[Out]

-1/8*(2*(2*a^2 - b^2)*(e + f*x)*(-2*c*f + d*(e - f*x)) - 16*a*b*f*(c + d*x)*Cosh[e + f*x] + b^2*d*Cosh[2*(e +
f*x)] + 16*a*b*d*Sinh[e + f*x] - 2*b^2*f*(c + d*x)*Sinh[2*(e + f*x)])/f^2

Maple [A] (verified)

Time = 1.05 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.96

method result size
parallelrisch \(\frac {2 b^{2} f \left (d x +c \right ) \sinh \left (2 f x +2 e \right )-b^{2} d \cosh \left (2 f x +2 e \right )+16 a b f \left (d x +c \right ) \cosh \left (f x +e \right )-16 a d b \sinh \left (f x +e \right )+\left (\left (-2 d \,x^{2}-4 c x \right ) f^{2}+d \right ) b^{2}+16 a b c f +8 f^{2} \left (\frac {d x}{2}+c \right ) x \,a^{2}}{8 f^{2}}\) \(111\)
risch \(\frac {a^{2} d \,x^{2}}{2}+a^{2} c x -\frac {d \,x^{2} b^{2}}{4}-\frac {b^{2} c x}{2}+\frac {b^{2} \left (2 d f x +2 c f -d \right ) {\mathrm e}^{2 f x +2 e}}{16 f^{2}}+\frac {a b \left (d f x +c f -d \right ) {\mathrm e}^{f x +e}}{f^{2}}+\frac {a b \left (d f x +c f +d \right ) {\mathrm e}^{-f x -e}}{f^{2}}-\frac {b^{2} \left (2 d f x +2 c f +d \right ) {\mathrm e}^{-2 f x -2 e}}{16 f^{2}}\) \(138\)
parts \(a^{2} \left (\frac {1}{2} d \,x^{2}+c x \right )+\frac {b^{2} \left (\frac {d \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}-\frac {d e \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}+c \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )\right )}{f}+\frac {2 a b \left (\frac {d \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}-\frac {d e \cosh \left (f x +e \right )}{f}+c \cosh \left (f x +e \right )\right )}{f}\) \(176\)
derivativedivides \(\frac {\frac {d \,a^{2} \left (f x +e \right )^{2}}{2 f}+\frac {2 d a b \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}+\frac {d \,b^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}-\frac {d e \,a^{2} \left (f x +e \right )}{f}-\frac {2 d e a b \cosh \left (f x +e \right )}{f}-\frac {d e \,b^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}+a^{2} c \left (f x +e \right )+2 a b c \cosh \left (f x +e \right )+b^{2} c \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}\) \(208\)
default \(\frac {\frac {d \,a^{2} \left (f x +e \right )^{2}}{2 f}+\frac {2 d a b \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}+\frac {d \,b^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}-\frac {d e \,a^{2} \left (f x +e \right )}{f}-\frac {2 d e a b \cosh \left (f x +e \right )}{f}-\frac {d e \,b^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}+a^{2} c \left (f x +e \right )+2 a b c \cosh \left (f x +e \right )+b^{2} c \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}\) \(208\)

[In]

int((d*x+c)*(a+b*sinh(f*x+e))^2,x,method=_RETURNVERBOSE)

[Out]

1/8*(2*b^2*f*(d*x+c)*sinh(2*f*x+2*e)-b^2*d*cosh(2*f*x+2*e)+16*a*b*f*(d*x+c)*cosh(f*x+e)-16*a*d*b*sinh(f*x+e)+(
(-2*d*x^2-4*c*x)*f^2+d)*b^2+16*a*b*c*f+8*f^2*(1/2*d*x+c)*x*a^2)/f^2

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.10 \[ \int (c+d x) (a+b \sinh (e+f x))^2 \, dx=\frac {2 \, {\left (2 \, a^{2} - b^{2}\right )} d f^{2} x^{2} + 4 \, {\left (2 \, a^{2} - b^{2}\right )} c f^{2} x - b^{2} d \cosh \left (f x + e\right )^{2} - b^{2} d \sinh \left (f x + e\right )^{2} + 16 \, {\left (a b d f x + a b c f\right )} \cosh \left (f x + e\right ) - 4 \, {\left (4 \, a b d - {\left (b^{2} d f x + b^{2} c f\right )} \cosh \left (f x + e\right )\right )} \sinh \left (f x + e\right )}{8 \, f^{2}} \]

[In]

integrate((d*x+c)*(a+b*sinh(f*x+e))^2,x, algorithm="fricas")

[Out]

1/8*(2*(2*a^2 - b^2)*d*f^2*x^2 + 4*(2*a^2 - b^2)*c*f^2*x - b^2*d*cosh(f*x + e)^2 - b^2*d*sinh(f*x + e)^2 + 16*
(a*b*d*f*x + a*b*c*f)*cosh(f*x + e) - 4*(4*a*b*d - (b^2*d*f*x + b^2*c*f)*cosh(f*x + e))*sinh(f*x + e))/f^2

Sympy [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.89 \[ \int (c+d x) (a+b \sinh (e+f x))^2 \, dx=\begin {cases} a^{2} c x + \frac {a^{2} d x^{2}}{2} + \frac {2 a b c \cosh {\left (e + f x \right )}}{f} + \frac {2 a b d x \cosh {\left (e + f x \right )}}{f} - \frac {2 a b d \sinh {\left (e + f x \right )}}{f^{2}} + \frac {b^{2} c x \sinh ^{2}{\left (e + f x \right )}}{2} - \frac {b^{2} c x \cosh ^{2}{\left (e + f x \right )}}{2} + \frac {b^{2} c \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{2 f} + \frac {b^{2} d x^{2} \sinh ^{2}{\left (e + f x \right )}}{4} - \frac {b^{2} d x^{2} \cosh ^{2}{\left (e + f x \right )}}{4} + \frac {b^{2} d x \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{2 f} - \frac {b^{2} d \sinh ^{2}{\left (e + f x \right )}}{4 f^{2}} & \text {for}\: f \neq 0 \\\left (a + b \sinh {\left (e \right )}\right )^{2} \left (c x + \frac {d x^{2}}{2}\right ) & \text {otherwise} \end {cases} \]

[In]

integrate((d*x+c)*(a+b*sinh(f*x+e))**2,x)

[Out]

Piecewise((a**2*c*x + a**2*d*x**2/2 + 2*a*b*c*cosh(e + f*x)/f + 2*a*b*d*x*cosh(e + f*x)/f - 2*a*b*d*sinh(e + f
*x)/f**2 + b**2*c*x*sinh(e + f*x)**2/2 - b**2*c*x*cosh(e + f*x)**2/2 + b**2*c*sinh(e + f*x)*cosh(e + f*x)/(2*f
) + b**2*d*x**2*sinh(e + f*x)**2/4 - b**2*d*x**2*cosh(e + f*x)**2/4 + b**2*d*x*sinh(e + f*x)*cosh(e + f*x)/(2*
f) - b**2*d*sinh(e + f*x)**2/(4*f**2), Ne(f, 0)), ((a + b*sinh(e))**2*(c*x + d*x**2/2), True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.41 \[ \int (c+d x) (a+b \sinh (e+f x))^2 \, dx=\frac {1}{2} \, a^{2} d x^{2} - \frac {1}{16} \, {\left (4 \, x^{2} - \frac {{\left (2 \, f x e^{\left (2 \, e\right )} - e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}{f^{2}} + \frac {{\left (2 \, f x + 1\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{f^{2}}\right )} b^{2} d - \frac {1}{8} \, b^{2} c {\left (4 \, x - \frac {e^{\left (2 \, f x + 2 \, e\right )}}{f} + \frac {e^{\left (-2 \, f x - 2 \, e\right )}}{f}\right )} + a^{2} c x + a b d {\left (\frac {{\left (f x e^{e} - e^{e}\right )} e^{\left (f x\right )}}{f^{2}} + \frac {{\left (f x + 1\right )} e^{\left (-f x - e\right )}}{f^{2}}\right )} + \frac {2 \, a b c \cosh \left (f x + e\right )}{f} \]

[In]

integrate((d*x+c)*(a+b*sinh(f*x+e))^2,x, algorithm="maxima")

[Out]

1/2*a^2*d*x^2 - 1/16*(4*x^2 - (2*f*x*e^(2*e) - e^(2*e))*e^(2*f*x)/f^2 + (2*f*x + 1)*e^(-2*f*x - 2*e)/f^2)*b^2*
d - 1/8*b^2*c*(4*x - e^(2*f*x + 2*e)/f + e^(-2*f*x - 2*e)/f) + a^2*c*x + a*b*d*((f*x*e^e - e^e)*e^(f*x)/f^2 +
(f*x + 1)*e^(-f*x - e)/f^2) + 2*a*b*c*cosh(f*x + e)/f

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.37 \[ \int (c+d x) (a+b \sinh (e+f x))^2 \, dx=\frac {1}{2} \, a^{2} d x^{2} - \frac {1}{4} \, b^{2} d x^{2} + a^{2} c x - \frac {1}{2} \, b^{2} c x + \frac {{\left (2 \, b^{2} d f x + 2 \, b^{2} c f - b^{2} d\right )} e^{\left (2 \, f x + 2 \, e\right )}}{16 \, f^{2}} + \frac {{\left (a b d f x + a b c f - a b d\right )} e^{\left (f x + e\right )}}{f^{2}} + \frac {{\left (a b d f x + a b c f + a b d\right )} e^{\left (-f x - e\right )}}{f^{2}} - \frac {{\left (2 \, b^{2} d f x + 2 \, b^{2} c f + b^{2} d\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{16 \, f^{2}} \]

[In]

integrate((d*x+c)*(a+b*sinh(f*x+e))^2,x, algorithm="giac")

[Out]

1/2*a^2*d*x^2 - 1/4*b^2*d*x^2 + a^2*c*x - 1/2*b^2*c*x + 1/16*(2*b^2*d*f*x + 2*b^2*c*f - b^2*d)*e^(2*f*x + 2*e)
/f^2 + (a*b*d*f*x + a*b*c*f - a*b*d)*e^(f*x + e)/f^2 + (a*b*d*f*x + a*b*c*f + a*b*d)*e^(-f*x - e)/f^2 - 1/16*(
2*b^2*d*f*x + 2*b^2*c*f + b^2*d)*e^(-2*f*x - 2*e)/f^2

Mupad [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.16 \[ \int (c+d x) (a+b \sinh (e+f x))^2 \, dx=\frac {a^2\,d\,x^2}{2}-\frac {b^2\,d\,x^2}{4}+a^2\,c\,x-\frac {b^2\,c\,x}{2}-\frac {b^2\,d\,{\mathrm {cosh}\left (e+f\,x\right )}^2}{4\,f^2}+\frac {b^2\,c\,\mathrm {cosh}\left (e+f\,x\right )\,\mathrm {sinh}\left (e+f\,x\right )}{2\,f}+\frac {2\,a\,b\,c\,\mathrm {cosh}\left (e+f\,x\right )}{f}-\frac {2\,a\,b\,d\,\mathrm {sinh}\left (e+f\,x\right )}{f^2}+\frac {2\,a\,b\,d\,x\,\mathrm {cosh}\left (e+f\,x\right )}{f}+\frac {b^2\,d\,x\,\mathrm {cosh}\left (e+f\,x\right )\,\mathrm {sinh}\left (e+f\,x\right )}{2\,f} \]

[In]

int((a + b*sinh(e + f*x))^2*(c + d*x),x)

[Out]

(a^2*d*x^2)/2 - (b^2*d*x^2)/4 + a^2*c*x - (b^2*c*x)/2 - (b^2*d*cosh(e + f*x)^2)/(4*f^2) + (b^2*c*cosh(e + f*x)
*sinh(e + f*x))/(2*f) + (2*a*b*c*cosh(e + f*x))/f - (2*a*b*d*sinh(e + f*x))/f^2 + (2*a*b*d*x*cosh(e + f*x))/f
+ (b^2*d*x*cosh(e + f*x)*sinh(e + f*x))/(2*f)